package org.xs.web.util;

import java.util.List;

import org.apache.log4j.Logger;

public class CollectionUtils {
	 private static final Logger logger = Logger.getLogger(CollectionUtils.class);
	 
	 public static void loggedDuplictionValue(List<Object> targetList,Object value){
		 int index = getListCollectionIndex(targetList, value);
		 if(index > 0){
			 Object target = targetList.get(index);
			 logger.debug("already");
		 }
	 }
	 public static int getListCollectionIndex(List<Object> targetList,Object value){
		 for(int i = 0 ; i< targetList.size();i++){
			 if(targetList.get(i) == value || targetList.get(i).equals(value)){
				 return i;
			 }
		 }
		 return -1;
	 }
}
